package util.SocketUtil;

import java.io.Serializable;

public class Message<T> implements Serializable {
    private String action;
    private T data;

    public Message(String action, T data) {
        this.action = action;
        this.data = data;
    }

    @Override
    public String toString() {
        return action+"=>"+data;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
